home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
16
/
wputil.zip
/
TRANSLIT.DOC
< prev
next >
Wrap
Text File
|
1985-11-19
|
2KB
|
56 lines
TRANSLIT
This program translates input from standard input to
standard output, using "from" and "to" conversion sets,
which are read from the command line.
This program is based on a RATFOR version published in
"Software Tools" by Kernighan and Plaguer.
Converted by:
Kevin Rosenberg
324 Tangelo
Irvine, CA 92714
(714) 857-2123
CompuServe 73775,1232
usage: translit from to [<infile] [>outfile]
If no input file if given, input is read from then keyboard.
If no output file id given, output is sent to the screen.
Special Characters that can be used in "from" & "to" sets
dash, -, fills a set
a-d = abcd, 5-8 = 5678
caret, ^, means everything but set
^a-z = everthing but lower case letters
escape, \, used to get special character
\n = newline, \b = blank, \t = tab
Examples:
translit a-z A-Z <file.dat
converts lower case to upper case
input is read from "file.dat" & output is sent to screen
translit A-za-z A-Za-z
converts lower case to upper case & upper case to lower case
input is read from keyboard & output is sent to screen
Special cases of "to" set being shorter than "from" set
1. If "to" set is shorter than "from" set, then a sequence of
characters that are in "from" are collapsed to a single
character of the "to" set. The first character of "to" set is
used.
e.g. translit \b\t\n \n
converts strings to white space to a newline
translit 0-9 n
converts strings of digits to a single n
2. If no "to" set given, then everything that is in "from"
set is deleted.
e.g. translit ^0-9. <text.dat >prn:
deletes everything but digits & decimal point
input is from text.dat & output is sent to the printer device.
>prn:
deletes everything but d